package achievement

import (
	"github.com/gin-gonic/gin"
	"lab.com/biz/achievementbiz"
	"lab.com/controller"
	"lab.com/request/achievementrequest"
)

// AchievementList return chievement list
func AchievementList(c *gin.Context) {
	inputParams := achievementrequest.AchievementListInputParams{}
	if err := inputParams.CheckInputParams(c); err != nil {
		controller.Resp(c, nil, err)
		return
	}

	res, err := achievementbiz.AchievementList(inputParams)

	if err != nil {
		controller.Resp(c, nil, err)
		return
	}

	controller.Resp(c, res, nil)
}
